<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.infodms.dms.common.Constant"%>

<%
	String contextPath = request.getContextPath();
%>
<%@taglib uri="/jstl/cout" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="${contextPath}/common/jsp_head_new.jsp" />
<script type="text/javascript">
	function doInit(){
		loadcalendar();   //初始化时间控件
	}
</script>
<title>批发查询</title>
</head>
<body onunload='javascript:destoryPrototype();' > 
<div class="wbox">
	<div class="navigation"><img src="<%=contextPath%>/img/nav.gif" />&nbsp;当前位置：  整车销售 &gt; 库存管理 &gt; 批发查询</div>
	<form id="fm" name="fm" method="post">
		<input type="hidden" name="curPage" id="curPage" value="1" />
		<input type="hidden" id="dlrId" name="dlrId" value="" />
		<table class="table_query" border="0">
		<c:if test="${returnValue==2}">
		<tr>
		<td  colspan="3"><font color="red">注意事项:</font></td>
	</tr>
		<tr>
		<td  colspan="3"><font color="red">1、大区内一级服务中心批发给一级服务中心——区域销售主管审核</font></td>
		</tr>
		<tr>
		<td  colspan="3"><font color="red">2、跨区或跨网批发——订单管理室赖从东审核。</font></td>
		</tr>
		<tr>
		<td  colspan="3"><font color="red">3、一级服务中心批发给二级经销商--无需审核，直接入二级经销商库房。</font></td>
		</tr>
		</c:if>
			<tr>
				<td class="tblopt">
				<div align="right">批发申请日期：</div>
				</td>
				<td>
					<div align="left">
	            		<input name="startDate" id="t1" value="" type="text" class="short_txt" datatype="1,is_date,10" group="t1,t2" hasbtn="true" callFunction="showcalendar(event, 't1', false);" />
	            		&nbsp;至&nbsp;
	            		<input name="endDate" id="t2" value="" type="text" class="short_txt" datatype="1,is_date,10" group="t1,t2" hasbtn="true" callFunction="showcalendar(event, 't2', false);" />
            		</div>	
				</td>
				<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">物料组选择：</div></td>
				<td>
					<input type="text" name="materialCode" size="10" value=""  />
       				<input type="button" value="..." class="mini_btn"  onclick="showMaterialGroup('materialCode','','true','');" />
				</td>
				<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">调入经销商：</div></td>
				<td width="39%" >
      				<input name="inDealerCode" type="text" id="inDealerCode" class="SearchInput" value="" size="20"  />
                    <input name="dlbtn" type="button" class="mini_btn" onclick="showOrgDealer('inDealerCode','','true');" value="..." />
    			</td>
    			<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">调出经销商：</div></td>
				<td width="39%" >
      				<input name="outDealerCode" type="text" id="outDealerCode" class="SearchInput" value="" size="20"  />
                    <input name="dlbtn" type="button" class="mini_btn" onclick="showOrgDealer('outDealerCode','','true');" value="..." />
    			</td>
    			<td></td>
			</tr>
			<tr>
				<td width="20%" class="tblopt"><div align="right">VIN：</div></td>
				<td width="39%" >
      				<textarea id="vin" name="vin" cols="18" rows="3" ></textarea>
    			</td>
				<td class="table_query_3Col_input" >
					<input type="button" class="normal_btn" onclick="__extQuery__(1);" value=" 查  询  " id="queryBtn" />&nbsp;&nbsp;
					<input type="button" class="normal_btn" onclick="getBatchesDownLoad();" value=" 下  载  " id="queryBtn" /> 
				</td>
			</tr>
		</table>
	<jsp:include page="${contextPath}/queryPage/orderHidden.html" />
	</form>
	<jsp:include page="${contextPath}/queryPage/pageDiv.html" />
	
</div>
<script type="text/javascript">
	var myPage;
	var url = "<%=contextPath%>/sales/storageManage/VehicleDispatchQuery/VehicleDispatchQueryDLR.json?COMMAND=1";
	var title = null;
	
	var columns = [
				{header: "批发号", dataIndex: 'TRANSFER_NO', align:'center'},
				{header: "调入经销商", dataIndex: 'DEALER_SHORTNAME', align:'center'},
				{header: "调出经销商", dataIndex: 'OUT_DEALER_NAME', align:'center'},
				{header: "VIN", dataIndex: 'VIN', align:'center'},
				{header: "物料名称", dataIndex: 'MATERIAL_NAME', align:'center'},
				{header: "申请日期", dataIndex: 'APP_DATE', align:'center'},
				{header: "批发原因", dataIndex: 'TRANSFER_REASON', align:'center'},
				{header: "审批状态", dataIndex: 'CHECK_STATUS', align:'center',renderer:getItemValue},
				{header: "审批意见", dataIndex: 'CHECK_DESC', align:'center'}
		      ];
	function getBatchesDownLoad(){
		fm.action = "<%=contextPath%>/sales/storageManage/VehicleDispatchQuery/vhclBatchesDownLoad.json";
		fm.submit();
	}
</script>    
</body>
</html>